password = 123
while True:
    pwd = input("请设置密码：\n")
    if not pwd:
        break
    confirm_pwd = input("请再次输入密码：\n")
    if pwd == confirm_pwd:
        password = pwd
        break
    print("两次输入密码不一致，请重新输入")
print("密码已变更为：", password)

print("进入开锁逻辑")
while True:
    input_pwd = input("密码：\n")
    if password in input_pwd:
        print("开锁成功")
        break
    else:
        print("请重新输入")
